Imports dao
 Imports DTO
 Imports System.data 
 Public Class AbstractBus
 Public Enum Class_KieuDL
 Access = 0 
 sql = 1
 SqlCe = 2
 Xml = 3
 Oracle = 4
 sqlExpress = 5
 MySql=6
 End Enum
 Public MSsql As integer = 0 
 Public ketnoi As New KetNoiDto 
 Public Sub New()
 End Sub
 Public Sub New(ByVal ConnectionString As KetNoiDto)
 ketnoi = ConnectionString
 End Sub 
 Public Function CreateTable(ByVal TenTable As String) As DataTable 
 Dim dao As New AbstractDao(TenTable, ketnoi)
 Return dao
 End Function
 Public Function CreateTableQuery(ByVal StringSql As String) As DataTable 
 Dim dao As New AbstractDao("LinhTinh", StringSql, ketnoi)
 Return dao
 End Function
 Public Function Kiemtraketnoi() As String
 Dim str As String =""
 Try
 Dim dao As New AbstractDao(ketnoi, True)
 dao.Moketnoi()
 dao.Ngatketnoi()
 Catch ex As Exception
 Str = ex.Message
 End Try
 Return Str
 End Function
 Public Sub UploadText(ByVal sqlString As String)
 Dim dao As New AbstractDao(ketnoi, True)
 dao.Thuc_hien_lenh(sqlString)
 End Sub
 Public Sub PhuchoiData(ByVal sqlString As String)
 Dim ketnoitam As KetNoiDto = ketnoi
 ketnoitam.ChuoiKetNoi = ketnoitam.ChuoiKetNoi.Replace(UCase(ketnoitam._DataBase), "master")
 Dim dao As New AbstractDao(ketnoitam, True)
 dao.Thuc_hien_lenh(sqlString)
 End Sub
 End Class
